Add missing subcommands to zsh auto-completion
authorFelix Crux <felixc@felixcrux.com>
Sat, 19 Dec 2015 00:11:32 +0000 (19:11 -0500)
committerFelix Crux <felixc@felixcrux.com>
Sat, 19 Dec 2015 16:35:29 +0000 (11:35 -0500)
Specifically, rustc, rustdoc, search, and uninstall.

src/etc/_cargo

index 7d368f97bce7ce2b33ec539194bf8c9d063d22c7..d40fa993774c705899f25546088fd64e2b971862 100644 (file)
@@ -211,6 +211,57 @@ case $state in
                     '*: :_normal' \
                 ;;
 
+            rustc)
+                _arguments \
+                    '--bench=[build only the specified benchmark target]' \
+                    '--bin=[build only the specified binary]' \
+                    '--color=:colorization option:(auto always never)' \
+                    '--example=[build only the specified example]' \
+                    '--features=[features to compile for the package]' \
+                    '(-h, --help)'{-h,--help}'[show help message]' \
+                    '(-j, --jobs)'{-j,--jobs}'=[number of jobs to run in parallel]' \
+                    '--lib[build only the library for this package]' \
+                    '--manifest-path=[path to the manifest to fetch dependencies for]' \
+                    '--no-default-features[do not compile default features for the package]' \
+                    '(-p, --package)'{-p,--package}'=[profile to compile for]' \
+                    '--profile=[profile to build the selected target for]' \
+                    '(-q, --quiet)'{-q,--quiet}'[no output printed to stdout]' \
+                    '--release[build artifacts in release mode, with optimizations]' \
+                    '--target=[target triple which compiles will be for]' \
+                    '--test=[build only the specified test target]' \
+                    '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \
+                    ;;
+
+            rustdoc)
+                _arguments \
+                    '--bench=[build only the specified benchmark target]' \
+                    '--bin=[build only the specified binary]' \
+                    '--color=:colorization option:(auto always never)' \
+                    '--example=[build only the specified example]' \
+                    '--features=[space-separated list of features to also build]' \
+                    '(-h, --help)'{-h,--help}'[show help message]' \
+                    '(-j, --jobs)'{-j,--jobs}'=[number of jobs to run in parallel]' \
+                    '--lib[build only the library for this package]' \
+                    '--manifest-path=[path to the manifest to document]' \
+                    '--no-default-features[do not build the `default` feature]' \
+                    '--open[open the docs in a browser after the operation]' \
+                    '(-p, --package)'{-p,--package}'=[package to document]' \
+                    '(-q, --quiet)'{-q,--quiet}'[no output printed to stdout]' \
+                    '--release[build artifacts in release mode, with optimizations]' \
+                    '--target=[build for the target triple]' \
+                    '--test=[build only the specified test target]' \
+                    '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \
+                    ;;
+
+            search)
+                _arguments \
+                    '--color=:colorization option:(auto always never)' \
+                    '(-h, --help)'{-h,--help}'[show help message]' \
+                    '--host=[host of a registry to search in]' \
+                    '(-q, --quiet)'{-q,--quiet}'[no output printed to stdout]' \
+                    '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \
+                    ;;
+
             test)
                 _arguments \
                     '--features=[space separated feature list]' \
@@ -227,6 +278,16 @@ case $state in
                     '1: :_test_names' \
                     ;;
 
+            uninstall)
+                _arguments \
+                    '--bin=[only uninstall the binary NAME]' \
+                    '--color=:colorization option:(auto always never)' \
+                    '(-h, --help)'{-h,--help}'[show help message]' \
+                    '(-q, --quiet)'{-q,--quiet}'[less output printed to stdout]' \
+                    '--root=[directory to uninstall packages from]' \
+                    '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \
+                    ;;
+
             update)
                 _arguments \
                     '--aggressive=[force dependency update]' \
@@ -288,7 +349,11 @@ local -a commands;commands=(
 'publish:upload package to the registry'
 'read-manifest:print manifest in JSON format'
 'run:run the main binary of the local package'
+'rustc:compile a package and all of its dependencies'
+'rustdoc:build documentation for a package'
+'search:search packages on crates.io'
 'test:execute all unit and tests of a local package'
+'uninstall:remove a Rust binary'
 'update:update dependencies'
 'verify-project:check Cargo.toml'
 'version:show version information'